<template>
  <div class="home">
    <NavBar></NavBar>
    <div class="top-box">
      <div class="top-title">
        <p class="top-main-title">猿创考试答题系统</p>
        <p class="top-s-title">从此爱上另一种生活</p>
      </div>
    </div>
    <div class="center-box">
      <div class="utils">
        <div class="utils-item" @click="goExercise">
          <img src="@/assets/icon/exercise.png" alt="" />
          <p>刷题</p>
        </div>
        <div class="utils-item" @click="goExam">
          <img src="@/assets/icon/test.png" alt="" />
          <p>考试</p>
        </div>
        <div class="utils-item" @click="goHistory">
          <img src="@/assets/icon/history.png" alt="" />
          <p>记录</p>
        </div>
      </div>
    </div>
    <div class="division">
      <el-divider>特点介绍</el-divider>
    </div>
    <div class="footer-box">
      <div class="footer-container">
        <div class="container">
          <div class="title">考生需知</div>
          <div class="text">
            <p>认认真真考试，堂堂正正做人</p>
            <p>已存在多套试卷，方便使用</p>
            <p>快捷查询分类，自行添加</p>
            <p>多角色，自动阅卷，考试记录存档</p>
          </div>
        </div>
      </div>
      <div class="footer-img"></div>
    </div>
  </div>
</template>

<script>
import NavBar from '@/components/NavBar'
export default {
  data() {
    return {};
  },
  mounted() {},
  components: {
    NavBar
  },
  methods: {
    // 跳转刷题页
    goExercise() {
      this.$router.push("/exercise")
    },

    // 跳转考试页
    goExam() {
      this.$router.push("/exam")
    },

    // 跳转记录页
    goHistory() {
      this.$router.push("/history")
    }
  }
};
</script>

<style lang="scss" scoped>
p {
  margin: 0;
}
.home {
  min-height: 100vh;
  width: 100%;

  .top-box {
    width: 100%;
    height: 250px;
    padding-top: 20px;
    background: url("@/assets/home_1.jpg") no-repeat;
    background-size: cover;
    background-position: center center;

    .top-title {
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      align-items: center;
      margin: 0 auto;
      width: 585px;
      height: 120px;
      top: 20px;
      color: #7d7d7d;

      .top-main-title {
        font-size: 35px;
        font-weight: 600;
      }

      .top-s-title {
        font-size: 20px;
        color: #888084;
        font-weight: 100;
      }
    }
  }

  .center-box {
    margin-top: -50px;
    width: 100%;
    height: 100px;
    // background-color: pink;

    .utils {
      display: flex;
      justify-content: space-around;
      width: 550px;
      height: 100%;
      margin: 0 auto;
      // background-color: pink;
    }

    .utils-item {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      height: 100%;
      width: 133px;
      background-color: #fff;
      border: 1px #fff solid;
      border-radius: 10px;
      box-shadow: #d3cfd9 1px 1px 10px 1px;
      cursor: pointer;

      img {
        height: 40px;
        width: 40px;
        margin-bottom: 10px;
      }

      p {
        font-size: 20px;
        color: #6c848d;
      }
    }
  }

  .division {
    width: 1000px;
    height: 20px;
    // background-color: red;
    margin: 20px auto;
  }

  .footer-box {
    display: flex;
    margin: 0 auto;
    width: 800px;
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: #d3cfd9 1px 1px 10px 1px;
    color: #e7e7eb;

    .footer-container {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
      width: 450px;
      background-color: #6c848d;

      .container {
        .title {
          font-size: 25px;
          font-weight: 500;
          margin-left: -20px;
        }

        .text {
          margin-top: 10px;

          p {
            margin-bottom: 5px;
            font-size: 20px;
            font-weight: 200;
          }
        }
      }
    }

    .footer-img {
      height: 100%;
      width: 350px;
      background: url("@/assets/bg.jpg") no-repeat;
      background-size: cover;
      background-position: center center;
    }
  }
}
</style>
